Skip to content

Conversation

@juliasloan25
Copy link
Member

Purpose

Get parameters from ClimaParams instead of hardcoding them in ClimaCoupler.

Note that any parameter overrides specified in parameter_files are now applied at the coupler level (in the driver), then passed to component models as a TOML dict. This might change interfaces for calibration and/or weather quest.

closes #1520
closes #1372

might close #342 and #70, but we need to make sure these parameters aren't being overwritten in component models

Content

  • parameters to get from CP
    • sigma (Stefan Boltzmann constant)
    • C_to_K
    • thermo_params
    • planet radius (note this was previously wrong when we constructed a boundary space independent of the atmosphere space, i.e. share_surface_space = false)
  • add constructors for prescribed ice and slab ocean parameters that take in a toml dict
  • for bucket and land constructors, take in a toml dict instead of a list of parameter files (parameters from these files are overriden at the coupler level now)

To Do

remaining:
atmos accepting a toml dict (maybe can just call AtmosConfig directly)
oceananigans/climaseaice accepting a toml dict of parameters
add tests to verify that components are using the same values

@juliasloan25 juliasloan25 force-pushed the js/climaparams branch 5 times, most recently from 05553da to 0f5c7bd Compare November 6, 2025 00:05
@juliasloan25
Copy link
Member Author

@costachris do you think this PR addresses #1491 or is there more work to be done for that?

Copy link
Member

@nefrathenrici nefrathenrici left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This looks good, though I'm a bit confused by the planet radius units.

return CA.AtmosConfig(atmos_config)

# Construct the AtmosConfig object
toml_dict = coupled_param_dict
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused by this toml_dict redefinition, do we not want to use the existing toml_dict?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops yes you are right

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Don't hardcode constants get boundary space radius from ClimaParams Unify parameter passing

3 participants